<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: system_states.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">system_states.h</div>  </div>
</div>
<div class="contents">
<a href="system__states_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SYSTEM_STATES_H_</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define SYSTEM_STATES_H_</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="comment">// State data type information</span>
<a name="l00032"></a><a class="code" href="structstate__t__info.html">00032</a> <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keyword">struct </span>{
<a name="l00033"></a><a class="code" href="structstate__t__info.html#ae955a81f5474b2457a6aa82ea183eab8">00033</a>         uint8_t <a class="code" href="structstate__t__info.html#ae955a81f5474b2457a6aa82ea183eab8">id</a>;
<a name="l00034"></a><a class="code" href="structstate__t__info.html#abf22bd945b57e8c3317a73c618f13aca">00034</a>         <span class="keywordtype">void</span>* <a class="code" href="structstate__t__info.html#abf22bd945b57e8c3317a73c618f13aca">state_p</a>;
<a name="l00035"></a><a class="code" href="structstate__t__info.html#a8831bb5e2e85d6aa8906e984c60c354e">00035</a>         <span class="keywordtype">int</span> <a class="code" href="structstate__t__info.html#a8831bb5e2e85d6aa8906e984c60c354e">state_size</a>;
<a name="l00036"></a>00036 } <a class="code" href="structstate__t__info.html">state_t_info</a>;
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="comment">// State variables defined in system</span>
<a name="l00039"></a>00039 <span class="keyword">extern</span> <a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a> <a class="code" href="group__tables.html#ga2807b9fb4b79e01dfde022b613d2575f" title="Position estimate (North,East,Down) [ ].">position</a>;
<a name="l00040"></a>00040 <span class="keyword">extern</span> <a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a> <a class="code" href="group__tables.html#ga589efe00d8bd4e8a69613f98390a04c7" title="Velocity estimate (North,East,Down) [ ].">velocity</a>;
<a name="l00041"></a>00041 <span class="keyword">extern</span> <a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a> <a class="code" href="group__tables.html#gaf92cab44915b7d9faaf5aeadb328bae6">accelerations_in</a>;
<a name="l00042"></a>00042 <span class="keyword">extern</span> <a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a> <a class="code" href="group__tables.html#ga8cac4b2812dcb492989d7122c5eb0bfb">angular_rates_in</a>;
<a name="l00043"></a>00043 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="group__openshoe__software.html#ga1c7df51cd44a9862d56e5a86a7382fe2">window_size</a>;
<a name="l00044"></a>00044 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="group__openshoe__software.html#ga20193da701b182264e8b7bf63293c0f9">time_since_last_zupt</a>;
<a name="l00045"></a>00045 <span class="keyword">extern</span> uint32_t <a class="code" href="group__openshoe__software.html#ga69242006691a47df6ea85e8cc45ccc43">process_cycle_counter</a>;
<a name="l00046"></a>00046 <span class="keyword">extern</span> <a class="code" href="nav__types_8h.html#ad9a64f455fa02affaba6740746aae7b2">quat_vec</a> <a class="code" href="group__tables.html#ga059b83d370e7e6a5e9728a8f91943051" title="Attitude (quaternions) estimate.">quaternions</a>;
<a name="l00047"></a>00047 <span class="keyword">extern</span> <span class="keywordtype">bool</span> <a class="code" href="group__tables.html#gabd51dc1d49060099533807a22acc61d4" title="Flag that is set to true if a zero-velocity update should be done.">zupt</a>;
<a name="l00048"></a>00048 <span class="keyword">extern</span> <a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a> <a class="code" href="group__tables.html#gacd438fa96131e9024d8ad206d83ffb66">imu_temperaturs</a>;
<a name="l00049"></a>00049 <span class="keyword">extern</span> <a class="code" href="nav__types_8h.html#a37e1884b1f06826c49607cec459b4e8a">precision</a> <a class="code" href="group__tables.html#ga3f561003deb253bcc716a6c690c87cfe">imu_supply_voltage</a>;
<a name="l00050"></a>00050 <span class="keyword">extern</span> <a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a> <a class="code" href="group__tables.html#ga1089eea940f41eff26a6cba1172089e9" title="Accelerometer biases (x,y,z-axis) [ ].">accelerometer_biases</a>;
<a name="l00051"></a>00051 
<a name="l00052"></a>00052 <span class="comment">// Maximum value of state ID (255)</span>
<a name="l00053"></a><a class="code" href="group__tables.html#gaeadb9947c80d097da4413c55179afe6f">00053</a> <span class="preprocessor">#define SID_LIMIT 0xFF</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00055"></a>00055 <span class="comment">// State ids (arbitrary number between 0x00 and 0xFF)</span>
<a name="l00056"></a><a class="code" href="group__tables.html#gaafd3e23709eecfd5bfdc358f8a07b991">00056</a> <span class="preprocessor">#define POSITION_SID 0x01</span>
<a name="l00057"></a><a class="code" href="group__tables.html#ga6b3256a3e116aaefe13352f9b493c279">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define VELOCITY_SID 0x02</span>
<a name="l00058"></a><a class="code" href="group__tables.html#gae1fc29b0358f36a68b7ba9bde85e16fd">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define QUATERNION_SID 0x03</span>
<a name="l00059"></a><a class="code" href="group__tables.html#gae04e393e8b250dad55fddb546ef61111">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define SPECIFIC_FORCE_SID 0x11</span>
<a name="l00060"></a><a class="code" href="group__tables.html#ga4bae6e7de487043575d61cb52dff4cf3">00060</a> <span class="preprocessor"></span><span class="preprocessor">#define ANGULAR_RATE_SID 0x12</span>
<a name="l00061"></a><a class="code" href="group__tables.html#ga1e61a3b04f0d9e2a1393e85a047a24ab">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define WINDOW_SIZE_PID 0x03</span>
<a name="l00062"></a><a class="code" href="group__tables.html#gadc587c273985fd12fc0553141c5f9693">00062</a> <span class="preprocessor"></span><span class="preprocessor">#define TIME_SINCE_LAST_ZUPT_SID 0x04</span>
<a name="l00063"></a><a class="code" href="group__tables.html#gacc410e7c7f1185c5dd50ac503dccabbe">00063</a> <span class="preprocessor"></span><span class="preprocessor">#define PROCESS_CYCLE_COUNTER_SID 0x05</span>
<a name="l00064"></a><a class="code" href="group__tables.html#ga1c2e91b10f17814f52bf09f647909d83">00064</a> <span class="preprocessor"></span><span class="preprocessor">#define ZUPT_SID 0x32</span>
<a name="l00065"></a><a class="code" href="group__tables.html#gad5186a188194306bbc87ddddc7644ddd">00065</a> <span class="preprocessor"></span><span class="preprocessor">#define IMU_TEMPERATURS_SID 0x33</span>
<a name="l00066"></a><a class="code" href="group__tables.html#gad0a37f572243f76ea1f2b79fc14b2a30">00066</a> <span class="preprocessor"></span><span class="preprocessor">#define IMU_SUPPLY_VOLTAGE_SID 0x34</span>
<a name="l00067"></a><a class="code" href="group__tables.html#gaf0c693bf22229a5eba03b2bad37b07bf">00067</a> <span class="preprocessor"></span><span class="preprocessor">#define ACCELEROMETER_BIASES_SID 0x35</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span>
<a name="l00069"></a>00069 <span class="comment">// State pointer and size information</span>
<a name="l00070"></a>00070 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> position_sti = {<a class="code" href="group__tables.html#gaafd3e23709eecfd5bfdc358f8a07b991">POSITION_SID</a>, (<span class="keywordtype">void</span>*) <a class="code" href="group__tables.html#ga2807b9fb4b79e01dfde022b613d2575f" title="Position estimate (North,East,Down) [ ].">position</a>, <span class="keyword">sizeof</span>(<a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a>)};
<a name="l00071"></a>00071 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> velocity_sti = {<a class="code" href="group__tables.html#ga6b3256a3e116aaefe13352f9b493c279">VELOCITY_SID</a>, (<span class="keywordtype">void</span>*) <a class="code" href="group__tables.html#ga589efe00d8bd4e8a69613f98390a04c7" title="Velocity estimate (North,East,Down) [ ].">velocity</a>, <span class="keyword">sizeof</span>(<a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a>)};
<a name="l00072"></a>00072 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> quaternions_sti = {<a class="code" href="group__tables.html#gae1fc29b0358f36a68b7ba9bde85e16fd">QUATERNION_SID</a>, (<span class="keywordtype">void</span>*) <a class="code" href="group__tables.html#ga059b83d370e7e6a5e9728a8f91943051" title="Attitude (quaternions) estimate.">quaternions</a>, <span class="keyword">sizeof</span>(<a class="code" href="nav__types_8h.html#ad9a64f455fa02affaba6740746aae7b2">quat_vec</a>)};
<a name="l00073"></a>00073 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> specific_force_sti = {<a class="code" href="group__tables.html#gae04e393e8b250dad55fddb546ef61111">SPECIFIC_FORCE_SID</a>, (<span class="keywordtype">void</span>*) <a class="code" href="group__tables.html#gaf92cab44915b7d9faaf5aeadb328bae6">accelerations_in</a>, <span class="keyword">sizeof</span>(<a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a>)};
<a name="l00074"></a>00074 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> angular_rate_sti = {<a class="code" href="group__tables.html#ga4bae6e7de487043575d61cb52dff4cf3">ANGULAR_RATE_SID</a>, (<span class="keywordtype">void</span>*) <a class="code" href="group__tables.html#ga8cac4b2812dcb492989d7122c5eb0bfb">angular_rates_in</a>, <span class="keyword">sizeof</span>(<a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a>)};
<a name="l00075"></a>00075 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> window_size_sti = {<a class="code" href="group__tables.html#ga1e61a3b04f0d9e2a1393e85a047a24ab">WINDOW_SIZE_PID</a>, (<span class="keywordtype">void</span>*) &amp;<a class="code" href="group__openshoe__software.html#ga1c7df51cd44a9862d56e5a86a7382fe2">window_size</a>, <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>)};
<a name="l00076"></a>00076 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> time_since_last_zupt_sti = {<a class="code" href="group__tables.html#gadc587c273985fd12fc0553141c5f9693">TIME_SINCE_LAST_ZUPT_SID</a>, (<span class="keywordtype">void</span>*) &amp;<a class="code" href="group__openshoe__software.html#ga20193da701b182264e8b7bf63293c0f9">time_since_last_zupt</a>, <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>)};
<a name="l00077"></a>00077 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> process_cycle_counter_sti = {<a class="code" href="group__tables.html#gacc410e7c7f1185c5dd50ac503dccabbe">PROCESS_CYCLE_COUNTER_SID</a>, (<span class="keywordtype">void</span>*) &amp;<a class="code" href="group__openshoe__software.html#ga69242006691a47df6ea85e8cc45ccc43">process_cycle_counter</a>, <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>)};
<a name="l00078"></a>00078 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> zupt_sti = {<a class="code" href="group__tables.html#ga1c2e91b10f17814f52bf09f647909d83">ZUPT_SID</a>, (<span class="keywordtype">void</span>*) &amp;<a class="code" href="group__tables.html#gabd51dc1d49060099533807a22acc61d4" title="Flag that is set to true if a zero-velocity update should be done.">zupt</a>, <span class="keyword">sizeof</span>(<span class="keywordtype">bool</span>)};
<a name="l00079"></a>00079 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> imu_temperaturs_sti = {<a class="code" href="group__tables.html#gad5186a188194306bbc87ddddc7644ddd">IMU_TEMPERATURS_SID</a>, (<span class="keywordtype">void</span>*) <a class="code" href="group__tables.html#gacd438fa96131e9024d8ad206d83ffb66">imu_temperaturs</a>, <span class="keyword">sizeof</span>(<a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a>)};
<a name="l00080"></a>00080 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> imu_supply_voltage_sti = {<a class="code" href="group__tables.html#gad0a37f572243f76ea1f2b79fc14b2a30">IMU_SUPPLY_VOLTAGE_SID</a>, (<span class="keywordtype">void</span>*) &amp;<a class="code" href="group__tables.html#ga3f561003deb253bcc716a6c690c87cfe">imu_supply_voltage</a>, <span class="keyword">sizeof</span>(<a class="code" href="nav__types_8h.html#a37e1884b1f06826c49607cec459b4e8a">precision</a>)};
<a name="l00081"></a>00081 <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a> accelerometer_biases_sti = {<a class="code" href="group__tables.html#gaf0c693bf22229a5eba03b2bad37b07bf">ACCELEROMETER_BIASES_SID</a>, (<span class="keywordtype">void</span>*) &amp;<a class="code" href="group__tables.html#ga1089eea940f41eff26a6cba1172089e9" title="Accelerometer biases (x,y,z-axis) [ ].">accelerometer_biases</a>, <span class="keyword">sizeof</span>(<a class="code" href="nav__types_8h.html#a90c683614d896321009d3b3c401b764f">vec3</a>)};
<a name="l00082"></a>00082 
<a name="l00083"></a>00083 <span class="comment">// Array of state data type struct pointers</span>
<a name="l00084"></a>00084 <span class="keyword">const</span> <span class="keyword">static</span> <a class="code" href="structstate__t__info.html">state_t_info</a>* state_struct_array[] = {&amp;position_sti,
<a name="l00085"></a>00085                                                                                        &amp;velocity_sti,
<a name="l00086"></a>00086                                                                                                    &amp;specific_force_sti,
<a name="l00087"></a>00087                                                                                                    &amp;angular_rate_sti,
<a name="l00088"></a>00088                                                                                                    &amp;window_size_sti,
<a name="l00089"></a>00089                                                                                                    &amp;time_since_last_zupt_sti,
<a name="l00090"></a>00090                                                                                                    &amp;process_cycle_counter_sti,
<a name="l00091"></a>00091                                                                                                    &amp;quaternions_sti,
<a name="l00092"></a>00092                                                                                                    &amp;zupt_sti,
<a name="l00093"></a>00093                                                                                                    &amp;imu_temperaturs_sti,
<a name="l00094"></a>00094                                                                                                    &amp;imu_supply_voltage_sti,
<a name="l00095"></a>00095                                                                                                    &amp;accelerometer_biases_sti};
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 
<a name="l00098"></a>00098 <span class="preprocessor">#endif </span><span class="comment">/* SYSTEM_STATES_H_ */</span>
<a name="l00099"></a>00099 
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Thu Dec 1 2011 15:06:32 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
